//检验时间是否正确
function check_time() {
    var start = document.getElementById("start_time");
    var end = document.getElementById("end_time");
    if (end.value <= start.value) {
        alert("结束时间不能早于或等于起始时间！");
        end.value = new Date();
    }
}

//1.获取当前日期
//2.设置时间选择框初始值
function getDate01() {
    var time = new Date();

    document.getElementById("start_time").value = addDate(time,-7);
    document.getElementById("end_time").value = addDate(time,+1);
    AddVersion();
}
function addDate(date,days){
    var d=new Date(date);
    d.setDate(d.getDate()+days);
    var m=d.getMonth()+1;
    var day=d.getDate();
    if(day<10)day="0"+day;
    if(m<10)m="0"+m;
    return d.getFullYear()+"-"+m+"-"+day;
}